package com.itheima.web.job;

import com.itheima.service.db.AnalysisByDayService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class AnalysisJob {

   @Reference
    private AnalysisByDayService analysisByDayService;

   //@Scheduled(cron="0 0 0/1 * * ?")//每小时执行一次
    @Scheduled(cron="0 0/1 * * * ?")//每分钟执行一次
    public void analysis(){
        System.out.println("=============开始分析日志==================");

        analysisByDayService.analysis();

        System.out.println("=============结束分析日志==================");

   }
}
